So we have studied in detail
the theory of sampling and interpolation and now
we want to look more closely at what
happens in practice. So let's start with sampling. So we know that if
you want to go from the continuous time domain to the discrete time
domain in theory. So we choose a time-based, a sampling period T_s, and then we project our input
function onto the space of F_s band-limited functions where F_s is given by one over T_s. This projection is performed
by taking the inner product between our input and
all the basis vectors for the space which are
translated versions of the scaled sinc and
translations and Scaling are both
determined by T_s. If we do that the spectrum
in the discrete time will be the truncated version of the continuous time
spectrum and re-scaled. So that minus Pi corresponds
to minus F_s over 2, and Pi corresponds
to say F_s over 2, and then of course, there's
an implicit periodization. So graphically, this
would be the case if this is our continuous time spectrum, the projection via
inner product with the sinc basis
functions will truncate the original spectrum between minus F_s over 2 and F_s over 2, and then the periodization
will give us this spectrum and we will map this interval to the minus PiPi interval
in discrete time. But in practice, we know that we cannot have an ideal sinc. We cannot implement an
ideal sinc sampler. So what we do in practice is we take raw samples of the input, and what happens to the
spectrum is that we have a periodization of the spectrum that is corrupted by
potential overlapping. So again, graphically speaking, this is the original spectrum and the periodization caused
by raw sampling will make all the copies that I remind you are placed F_s hertz apart, will make these
copies overlap and so then when we map the
minus F_s over 2 to F_s over 2 interval to
minus PiPi we get something that is
an aliased version of the original spectrum. So now let's look at the converse problem going from discrete time
to continuous time. Again, in the ideal case,
we know what to do. We have our samples that are
obtained via sinc sampling, and to reconstruct the
continuous time function, we just take a linear
combination of sinc basis functions where the weights are the
values of the samples. In the frequency domain, when we compute the
Fourier transform of these reconstituted sequence, we have that the spectrum is just a re-scaled version of the discrete time spectrum
which is two Pi periodic. So this becomes F_s periodic in continuous
time, and the sinc, the function of the sinc
as an interpolator in the frequency domain becomes
multiplication by a rect, and this eliminates
the periodicity of the discrete time spectrum. Graphically, if this is the spectrum in discrete
time of our sequence, when we interpolate via sinc, the interpolation gives us
continuous time spectrum which is F_s periodic and then the sinc interpolant
becomes erect filter in the frequency domain
and only keeps the base band version
of this copies. So in practice, the
sinc interpolation given a interpolation interval T_s simply maps the
minus PiPi interval in the DTFT of the sequence to the minus F_s over
two to F_s over two interval in the
continuous time domain and again of course F_s is
equal to one over T_s. Now in practice, we will
not be able to implement a sinc interpolator
because the sinc is an ideal response that we
cannot achieve in practice. So what do we do well,
we can use one of these low order
interpolators that we have seen in our lecture
about interpolation. So a first-order, a zero
order, a third order. When we do that, we have this mixed domain
convolution where we take our samples and we
take an interpolator with a given shape that we translate at all
multiples of T_s, and we build this linear
combination if you want the translated copies
of the interpolation kernel. So the question now is what is the spectrum in continuous time of a signal that has been interpolated with a
non-ideal interpolator, with a non sinc interpolator. So let's compute this
Fourier transform. The continuous time signal is this one here this mixed
domain convolution between the discrete time
samples and shifted and scaled versions of
the interpolation kernel. The Interpolation
kernel, I remind you is a local support function. It could be for instance
support equal to one in the case of
the zero order hold, support equal to two for a first order, interpolator or support equal to four for a
third order interpolator. The nature of the interpolator is relevant at this point
we're just trying to find the general expression for the spectrum of the
continuous time signal. So we start with the definition
of the Fourier transform. We replace the
expression for x of t by the linear combination
that we've seen before and then of course we exchange the summation
and integral and we have this expression here where we
have an outer sum that runs over all the elements in
the discrete time sequence, and here inside we have
something that looks like the Fourier transform
of the shifted and scaled local
interpolation kernel. We are now going to
use two properties of the continuous time
Fourier transform. This first is the Scaling
property and that tells us that the Fourier transform of a function that is
scaled in time-domain. So contracted or expanded by a factor A will be the
Fourier transform of the original function where the frequency axis has
been scaled by the reciprocal of A and the magnitude of the Fourier transform
must be multiplied by A. In a nutshell, if we
have a function in the time domain that
gets contracted in time, that means that the
Fourier transform will expand in frequency
and vice versa. The second properties
simply tells us that the Fourier transform
of a time shifted function is the
Fourier transform of the original function multiplied
by a pure phase factor. We have seen this before
even in discrete time. So the Fourier transform of
I of t minus nT_s over T_s. So scaled by one
over T_s and delayed by nT_s will be equal to T_s times the Fourier transform of the interpolation
kernel scaled in frequency by T_s and multiply by a phase factor which is e
to the minus 2 PinT_sf. So let's replace
the value for the integral in this summation we
had before and we have T_s, then we have the outer summation over the samples that multiplies the Fourier transform of
the interpolation kernel with the frequency axis scale by T_s times a phase factor. We take out of the sum
everything that does not depend on the index n. We replace T_s by one over F_s which is the
standard equivalence. Also inside the argument of the Fourier transform and then we're left with this summation here which looks very much like a DTFT and indeed
it is the DTFT of the discrete-time
sequence computed in Omega equal to 2 Pif over F_s. So as per usual this kind
of a dry derivation. So let's look at some
examples graphically and the first one we will choose our interpolation
kernel to be this sinc. Well of course we're
doing all this to show what happens when
we're not using the sinc, but let's start with
the sinc to see what happens in the ideal case. If the interpolator is the sinc, then its Fourier
transform will be direct and therefore our
formula will look like so. It will be 1 over F_s the scaling factor times rect of f over F_s. So this is a rectangular
function that selects only the region
between f minus F_s over 2 and F_s over 2 times the re-scaled DTFT of the
discrete time sequence, and so this is what
we have seen before. This is our interpolator,
the ideal interpolator. This is its Fourier transform. We're taking our
discrete time sequence. We interpolate, we get
a periodic spectrum in continuous time because of the interpolation
procedure and then the sinc kernel will make
sure that we only select the base band component between minus F_s over 2 and F_s over 2. Well now, what happens if
we use a zero order hold? In that case, the
roles are inverted. The signal will be a rect
in the time domain and its Fourier transform
is now a sinc. So in this case, we replace these values in
the expression for the Fourier transform of
the interpolated signal and we get something similar
to what we had before. The only difference is now the Fourier transform of the
kernel which is the sinc. Again, this will be
our interpolator in the time domain
compact support kernel and its Fourier transform
which we show here in magnitude is this one
and notice that the first zero of the Fourier transform falls at a frequency of F_s. This will be important
in what follows. So let's take our
usual generic spectrum for discrete-time sequence. The re-scaling of the
spectrum when we go to continuous time will give us this periodic pattern and now the action of the zero order hold in frequency will
be multiplication by a sinc and this leads to a continuous time
spectrum that looks like so. You can see that we don't have perfect rejection outside
of that minus F_s over 2, two F_s over 2 band. We have a lot of spurious
high frequency components. Things can get slightly better if we use a first
order interpolator. Now the shape of the interpolator in the
time domain is like so, and in frequency domain the
characteristic is that of a sinc square we
have seen that in discrete-time and of course it's the same in continuous time. Again, the first zero of the magnitude response
is still at F_s, but you can see
that the side lobes outside of the main
lobe are much smaller. So when we apply the first order interpolator to a generic discrete time sequence, we get the following pattern. This is the periodized spectrum and the effect of the
interpolator results in this. Now, you have two problems still. You have the in-band
distortion because the characteristic
of the interpolator are not flat over the band of interests and then the
rejection is not perfect. Out-of-Band you still have side lobes that of
course are a bit better, a bit smaller because we're using a higher order
interpolator and things would get better still if we use an even higher
order interpolator. But in all cases, the net result of having
a non-ideal interpolator is in-band distortions and out-of-band
spurious components. We will see in the
next modules how we can ameliorate
the situation by being smarter with respect to what we do in the
discrete time domain.